function [teach_rank] = func_rank(IJirank_all,jass_iprop_wide_teachsort)
% Takes in ranks and assignments and spits out a vector which is the rank
% of the school in teacher i's preferences of the school to which she is
% assigned



    teach_rank=zeros(length(jass_iprop_wide_teachsort),1);

for i=1:length(jass_iprop_wide_teachsort)
   
    teach_rank(i,1)= find(IJirank_all(jass_iprop_wide_teachsort(i,1),:)==  jass_iprop_wide_teachsort(i,2));

    
end



teach_rank=mean(teach_rank);


